#ifndef _MCU_DRIVERS_DATARECORD_H_
#define _MCU_DRIVERS_DATARECORD_H_


#include "InnerFlash.h"

//index要小于4074,目前开辟的最大的用于存储数量的空间索引为4073
//读取flash内容
uint16_t DataRecord_ReadData(uint16_t index);

void DataRecord_ErasePage();

//index要小于4074,目前开辟的最大的用于存储数量的空间索引为4073
//往flash写入内容
uint16_t DataRecord_WriteData(uint16_t index, volatile OneInstruction_t data);

uint16_t DataRecord_WriteDataArray(uint16_t index, volatile OneInstruction_t *data, uint16_t length);

//擦除一大页flash
void EraseLargePage(uint16_t pageIndex);

//填充一大页flash
void FillLagrePage(uint16_t pageIndex);

#endif